import java.util.InputMismatchException;
import java.util.Scanner;

/**
 * Created with IntelliJ IDEA.
 * User: Thoughtworker
 * Date: 7/9/13
 * Time: 3:52 PM
 * To change this template use File | Settings | File Templates.
 */
public class Menu {
    public void welcomeMessage(){
        System.out.println("Welcome to the library");
    }

    public void printMenuOptions(){
        System.out.println("1. View List of Books");
        System.out.println("2. Reserve a Book (Requires authorization)");
        System.out.println("3. Check membership details");
        System.out.println("4. View List of Movies");
        System.out.println("5. Login");
        System.out.println("6. Exit");
    }

    public int selectMenuOption(){
        int userInput;
        System.out.println("Select a Menu Option by number:");
        do try{
            Scanner input = new Scanner(System.in);
            userInput = input.nextInt();
            break;
        }
        catch (InputMismatchException e){
            System.out.println("Select a valid option!");
        }
        while(true);
        return userInput;
    }

    public void printSeeLibrarian(){
        System.out.println("Please Talk to a Librarian. Thank you!");
    }

    public String queryUser(String query) {
        System.out.println(query);
        Scanner input = new Scanner(System.in);
        return input.next();
    }
}
